<style lang="scss" scoped>
.box {
    width: 100vw;
    background-color: #ececec;
}

.tabs {
    background-color: #fff;
    flex-wrap: wrap;
    /* 阻止文本自动换行 */
    // overflow-x: auto;
    /* 当内容超出容器宽度时，显示水平滚动条 */
    display: flex;
    /* 使用弹性布局 */
    // align-items: center;
    /* 垂直居中对齐 */
    padding: 8px;
    /* 添加内边距，让内容与容器边缘有一定的距离 */
    // text-align: center;
}

.tab {
    padding: 5px 10px;
    margin-bottom: 5px;
    margin-left: 10px;
    background-color: #ececec;
    border-radius: 50px;
}

.active {
    background-color: rgb(30, 112, 255);
    color: #fff;
}
</style>
<template>
    <div class="box">
        <van-nav-bar title="评论" left-text="返回" left-arrow @click-left="router.go(-1)" />
        <PinJia></PinJia>
    </div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import router from '@/router';
import axios from 'axios'
import { useRoute } from 'vue-router';
import type { ListDatagete } from '@/Type/indeType';
import PinJia from '@/components/Home/PinJia.vue';
const route = useRoute()
interface ListData {
    reviewname: string,
    reviewtitle: string,
    reviewstate: string | string[],
    reviewgood: number
}
const ListData = ref<ListData[]>([])
const listId = ref(route.query.id as string | undefined);
const getList = () => {
    axios.get('/api/review/list', { params: { id: listId.value, state: '' } }).then(res => {
        ListData.value = res.data.data
    })
}
getList()
const doctorListitem = ref<ListDatagete | null>(null);
const getData = () => {
    axios.get('/api/doctor/detail', { params: { id: listId.value, state: '' } }).then(res => {
        doctorListitem.value = res.data.data[0]
    })
}
getData()
</script>